# coding = utf-8
# 客户端
import socket

client = socket.socket()
client.connect(('localhost', 6969))

while True:
    msg = input(">>:").strip()
    if msg is None:
        continue
    client.send(msg.encode("utf-8"))
    data = client.recv(1024)
    print("To:", data.decode())


client.close()











